import request from '@/utils/request'

// 查询 facility列表
export function listFacility(query) {
  return request({
    url: '/data/kd/list',
    method: 'get',
    params: query
  })
}
export function listFacDatas(query) {
  return request({
    url: '/data/kd/list',
    method: 'get',
    params: query
  })
}
export function listFacilityOriginal(query) {
  return request({
    url: '/data/kd/listOriginal',
    method: 'get',
    params: query
  })
}

export function listReactorCore(query) {
  return request({
    url: '/data/kd/listReactorCore',
    method: 'get',
    params: query
  })
}
export function mongdbDataOneOrignal(query) {
  return request({
    url:"/practice/data/mongdbDataOrignal",
    method:"Post",
    params:query
  })
}
export function listFacilityReactor(query) {
  return request({
    url: '/data/kd/listReactor',
    method: 'get',
    params: query
  })
}

// 数据看板列表 当前
export function listViewBoardNow(query) {
  return request({
    url: '/data/kd/nowData',
    method: 'get',
    params: query
  })
}

// 数据看板列表 实时
export function listViewBoard(query) {
  return request({
    url: '/data/kd/listData',
    method: 'get',
    params: query
  })
}

// 发送警报
export function ssePush(query) {
  return request({
    url: '/sse/push/2',
    method: 'get',
    params: query
  })
}

// 事件时间轴 左
export function emergencyList(query) {
  return request({
    url: '/practice/event/emergencyPracButton/'+query.id,
    method: 'get',
    params: query
  })
}

// 事件时间轴 右
export function getPracMonitorOperList(query) {
  return request({
    url: '/practiceEmergency/oper/getPracMonitorOperList',
    method: 'get',
    params: query
  })
}

// 大屏时间轴
export function bigScreenPracMonitorOperList(query) {
  return request({
    url: '/emergency/oper/getPracMonitorOperList',
    method: 'get',
    params: query
  })
}

// 图表数据列表
export function cerfDataList(params) {
  return request({
    url: '/practice/data/mongdbDataList',
    method: 'post',
    params: params
  })
}

// 图表数据详情
export function cerfDataDetail(params){
  return request({
    url: '/practice/data/mongdbDataOneListByName',
    method: 'Post',
    params:params,
  })
}

// cerf堆列表项
export function flagDataList(params) {
  return request({
    url: '/practice/data/mongdbDataFlag',
    method: 'post',
    params: params
  })
}
//获取演习时间
export function getPracticeTime(params) {
  return request({
    url: '/practice/data/getTime',
    method: 'get',
    params: params
  })
}

// 获得最新堆芯数据
export function getReactorCore(params) {
  return request({
    url: '/practice/data/mongdbDataReactorCore',
    method: 'post',
    params: params
  })
}


// 应急模式和进入应急时间
export function getCurrentInfo(query) {
  return request({
    url: '/emergency/info/getCurrentInfo',
    method: 'get',
    params: query
  })
}

// 获取当前是否演习模式
export function getIsPRAC(query) {
  return request({
    url: '/common/config/getByKey/IS_PRAC',
    method: 'get',
    params: query
  })
}

// 获取演习id
export function getPRAC_INFO(query) {
  return request({
    url: '/common/config/getByKey/PRAC_INFO',
    method: 'get',
    params: query
  })
}

// 返回  实际时间 加速时间 故事时间
export function timeListAll(query) {
  return request({
    url: '/practice/time/listAll',
    method: 'get',
    params: query
  })
}

// 时间轴左边 按钮事件点击id
export function pracEvent(query) {
  return request({
    url: '/practice/data/PracButton',
    method: 'post',
    params: query
  })
}

// 获取演习列表
export function pracParamters(query) {
  return request({
    url: '/practice/data/pracParamters',
    method: 'post',
    params: query
  })
}

// 获取故事时间
export function getTime(query) {
  return request({
    url: '/practice/data/getTime',
    method: 'get',
    params: query
  })
}
// 获取最新数据
export function getLatestData(query) {
  return request({
    url: '/practice/data/getLatestData',
    method: 'get',
    params: query
  })
}
// 获取时间段数据
export function getPeriodData(query) {
  return request({
    url: '/practice/data/getPeriodData',
    method: 'get',
    params: query
  })
}
